﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>LETTER DETAIL</title>
		<%@ include file="/share/include.jsp" %>
		<!-- <script src="js/jquery.min.js"></script> -->
   		 <meta name="viewport" content="width=device-width, initial-scale=1">
		 <script type="application/x-javascript"> 
			addEventListener("load", function() { 
				setTimeout(hideURLbar, 0); 
			}, false); 
			function hideURLbar(){ 
				window.scrollTo(0,1); 
			} 
		</script>
	</head>
	<body>
		<!-- container -->
		<!-- header -->
		<div class="header">
			<%@ include file="/control/jsp/layout/header.jsp" %>
			<!-- /bottom-header -->
		</div>
		<!-- header -->
		<!--- top-nav -->
			<c:if test="${not empty form.letterUserId }">
				<%@ include file="/control/jsp/layout/userMenu.jsp" %>
			</c:if>
			<c:if test="${not empty form.letterShopId }">
				<%@ include file="/control/jsp/layout/sellerMenu.jsp" %>
			</c:if>
		<!--- top-nav -->
		<!-- Product-Details-page -->
		<div class="details-page">
			<div class="content details-page">
				<div class="product-details">
					<div class="container">
						<div class="details-left" style="width: 100%;margin-top: 20px;">
							<div style="margin-bottom: 10px;">
								<c:if test="${not empty reqUrl }">
									<input type="reset" class="p-btn" style="height: 40px;width: 80px;" onclick ="window.location.href='${root}/${reqUrl}'" value="Back">
								</c:if>
								<c:if test="${empty reqUrl }">
									<input type="reset" class="p-btn" style="height: 40px;width: 80px;" onclick ="javascript:history.go(-1);" value="Back">
								</c:if>
								<c:if test="${not empty form.letterUserId and form.letterType == 2 }">
									<input type="button" class="p-btn" style="height: 40px;width: 80px;" value="Reply" onclick="window.location.href='${root}/control/letter/letterController/displayReplyLetter.do?letterId=${letter.letterId }&letterUserId=${form.letterUserId }&letterShopId=${form.letterShopId }'" />
								</c:if>
								<c:if test="${not empty form.letterShopId and form.letterType == 1 }">
									<input type="button" class="p-btn" style="height: 40px;width: 80px;" value="Reply" onclick="window.location.href='${root}/control/letter/letterController/displayReplyLetter.do?letterId=${letter.letterId }&letterUserId=${form.letterUserId }&letterShopId=${form.letterShopId }'" />
								</c:if>
							</div>
						    <c:if test="${letter.letterType == 1}">
						    	<div style="width: 100%;float: left;padding: 10px 10px 0px 10px;margin-bottom:20px;border-bottom: 1px solid #bac7d2;background-color: #e7f1f7;">
								    <p><b>Letter Title  :  </b><span>${fn:escapeXml(letter.letterTitle)}</span></p>
								    <p><b>The Sender(User)  :  </b><span>${fn:escapeXml(letter.letterUserName)}</span></p>
									<p ><span>The Sender Phone：</span><span>${fn:escapeXml(letter.letterPhone)}</span></p>
									<p ><span>Send Time：</span><span><fmt:formatDate value="${letter.letterCreateTime}" pattern="yyyy-MM-dd HH:mm:ss"/></span></p>
									<p><b class="">The Recipient(Shop)  :  </b><span>${fn:escapeXml(letter.letterShopName)}</span></p>
									<p><font class="">Order Number  :  </font><span><a href="${root }/control/order/orderItemController/displayOrderDetail.do?orderId=${letter.letterOrderId }&orderUserId=${form.letterUserId }&orderShopId=${form.letterShopId }">${fn:escapeXml(letter.letterOrderId)}</a></span></p>
								</div>
								<h4 style="padding-bottom:10px;border-bottom: 1px solid #bac7d2;font-weight: bold;">The Content</h4>
							    <textarea readonly="readonly" style="width: 100%; min-height:250px;padding: 20px;border-collapse: inherit;">${fn:escapeXml(letter.letterContent)}</textarea>
							</c:if>
							<c:if test="${letter.letterType == 2}">
								<div style="width: 100%;float: left;padding: 10px 10px 0px 10px;margin-bottom:20px;border-bottom: 1px solid #bac7d2;background-color: #e7f1f7;">
								    <p><b>Letter Title  :  </b><span>${fn:escapeXml(letter.letterTitle)}</span></p>
								    <p><b>The Sender(Shop)  :  </b><span>${fn:escapeXml(letter.letterShopName)}</span></p>
									<p ><span>The Sender Phone：</span><span>${fn:escapeXml(letter.letterPhone)}</span></p>
									<p ><span>Send Time：</span><span><fmt:formatDate value="${letter.letterCreateTime}" pattern="yyyy-MM-dd HH:mm:ss"/></span></p>
									<p><b class="">The Recipient(User)  :  </b><span>${fn:escapeXml(letter.letterUserName)}</span></p>
									<p><font class="">Order Number  :  </font><span><a href="${root }/control/order/orderItemController/displayOrderDetail.do?orderId=${letter.letterOrderId }&orderUserId=${form.letterUserId }&orderShopId=${form.letterShopId }">${fn:escapeXml(letter.letterOrderId)}</a></span></p>
								</div>
								<h4 style="padding-bottom:10px;border-bottom: 1px solid #bac7d2;font-weight: bold;">The Content</h4>
							    <textarea readonly="readonly" style="width: 100%; min-height:250px;padding: 20px;border-collapse: inherit;">${fn:escapeXml(letter.letterContent)}</textarea>
							</c:if>
						    <!-- <div style="width: 49%;float: left;border-right: 1px solid #dbdbdb;margin-right: 10px;">
							    <h4 class="tit_det">User信息</h4>
								<div><span>User姓名：</span><span>username</span></div>
								<div><span>联系人：</span><span>peopname</span></div>
								<div><span> Phone：</span><span>151********</span></div>
								<div><span>联系地址：</span><span>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</span></div>
							</div>
						    <div>
							    <h4 class="tit_det">商家信息</h4>
								<div><span>Shop名称：</span><span>shopname</span></div>
								<div><span>联系人：</span><span>sllername</span></div>
								<div><span> Phone：</span><span>151********</span></div>
								<div><span>联系地址：</span><span>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</span></div>
							</div> 
							<div>
							    <h4 class="tit_det">Order Number号</h4>
								<input type="text" style=" background: wheat; border:0; padding-left: 20px;" disabled="disabled" readonly="readonly" value="${fn:escapeXml(letter.letterOrderId)}" />
							</div>
							<div> 
							    <h4 style="padding-bottom:10px;border-bottom: 1px solid #bac7d2;font-weight: bold;">The Content</h4>
							    <h4 style="border-top: 1px solid #dbdbdb;"><fmt:formatDate value="${letter.letterCreateTime}" pattern="yyyy-MM-dd HH:mm:ss"/></h4> 
							    <textarea disabled="disabled" readonly="readonly" style="width: 100%; min-height:250px;padding: 20px;border-collapse: inherit;">${fn:escapeXml(letter.letterContent)}</textarea>
							</div>
							<div>
							    <h4 class="tit_det">Reply详情</h4>
							    <h4>2012/12/12</h4>
							    <textarea disabled="disabled" readonly="readonly"  style="width: 80%; background: wheat; padding: 20px;border-collapse: inherit;"></textarea> 
							</div>-->
						</div>
						<div class="clearfix"> </div>
					</div>
			    </div>
		    </div>
		</div>
		<!-- /Product-Details-page -->
		<!-- footer -->
		<%@ include file="/control/jsp/layout/footer.jsp" %>
</body>
</html>

